package com.shangshi.shop.controller;

import com.shangshi.shop.bean.Result;
import com.shangshi.shop.bean.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * @Author liuyuan
 * @Date 2022/7/14 下午8:04
 * @Version 1.0
 */
@RestController
public class UserController {
    @RequestMapping("/user/list")
    public Result userList(){
       Result result = new Result();
        ArrayList<User> userArrayList = new ArrayList<>();
        User user = new User();
        user.setAge(19);
        user.setIphone("199999999");
        user.setName("zhangsan");
        user.setSex("1");
        userArrayList.add(user);
        result.setCode("2000");
        result.setMsg("查询成功");
        result.setData(userArrayList);
        return result;
    }

}
